<%@ include file="/common/taglibs.jsp"%>
<%@page import="java.net.URLEncoder"%>
<div id="messagesDiv">
<%@ include file="/common/messages.jsp"%>
</div>
<%@page import="org.icnmasjid.member.model.Person"%>
<title>ICN WS Registration 2011-2012</title>
<c:if test="${alreadyRegistered == 'true'}">
	<script type="text/javascript">
	  function postPaypal()
	  {
		$('paypalForm').submit();
		return false;
	  }
	</script>
	<div style="display:none">
	<form id="paypalForm" action="https://www.paypal.com/cgi-bin/webscr">
		<input type="hidden" name="cmd" value="_xclick"/>
		<input type="hidden" name="business" value="admin@islamiccenterofnaperville.org"/>
		<input type="hidden" name="no_shipping" value="1"/>
		<input type="hidden" name="no_note" value="1"/>
		<input type="hidden" name="return" value="http://icnschool.org"/>
		<input type="hidden" name="currency_code" value="USD"/>
		<input type="hidden" name="tax" value="0"/>
		<input type="hidden" name="invoice" value="${requestScope.personId}"/>
		<input type="hidden" name="item_name" value="ICN Weekend School 2011-2012 Fees"/>
		<input type="hidden" name="amount" value="100.00"/>
	</form>
	</div>
	<h2><a href="#" onclick="postPaypal();" style="font-size: 16pt; font-decoration: underline; color: blue">
		If you haven't paid your fees please click here to pay your $100 for registration</a>
	</h2>	
</c:if>
<content tag="heading">ICN Weekend School Registration 2011-2012</content>
		<ul>
			<li>
				<h2>
					Fees for 2011-2012 School Year are as below (this includes books and lunch):</h2>
			</li>
		</ul>
		<ol style="margin-left: 40px; ">
			<li>
				<h2>
					One child : $395</h2>
			</li>
			<li>
				<h2>
					Two Children: $740</h2>
			</li>
			<li>
				<h2>
					Three or more Chidren: $1000</h2>
			</li>
		</ol>
		<ul>
			<li>
				<h2>
					A payment of $100 is required to confirm the seat(s). The $100 you pay is part of your fees and is required to confirm registration.</h2>
			</li>
			<li>
				<h2>
					You will be able to make payments using your credit or debit card.</h2>
			</li>
			<li>
				<h2>
					If you would like to pay by check or cash please drop off your check or cash at the ICN WS by 5/21/2011.&nbsp;</h2>
			</li>
			<li>
				<h2>
					We will be opening the registration for new students after 5/21/2011.</h2>
			</li>
			<li>
				<h2>
					If your payment is not received by 5/21/2011 we cannot guarantee a seat for the next year.</h2>
			</li>
			<li>
				<h2>
					Please select the checkbox(es) for each child you would like to register for 2011-2012 School Year and then click the submit button.</h2>
			</li>
		</ul>
<c:if test="${person.personId != null && person.primaryPerson }">
	<%
		pageContext.setAttribute("passKeyEncoded", URLEncoder.encode(request.getParameter("passKey"),"UTF-8"));
	%>
	<form id="submitRegistrationId" action="" method="post">
<!--		<input type="hidden" name="passKey" value="${pageScope.passKeyEncoded}"/>-->
		<input type="hidden" name="passKey" value="<%=request.getParameter("passKey")%>"/>
		<display:table name="students" cellspacing="0" cellpadding="0" requestURI=""
		    id="student" pagesize="25" class="table personList" export="false">	
		    <display:column property="firstName" escapeXml="true" sortable="false" title="First Name"/>
		    <display:column property="lastName" escapeXml="true" sortable="false" title="Last Name"/>
		    <display:column escapeXml="true" sortable="false" title="Current Grade">
		    	<c:out value="<%=((Person)pageContext.getAttribute(\"student\")).getGrade(\"Student-2010\")%>"/>
		    </display:column>
		    <display:column escapeXml="false" sortable="false" title="Register For Next Year">		    	
		    	<input type="checkbox" name="selectedStudentsId" value="<%=((Person)pageContext.getAttribute("student")).getPersonId()%>" />
		    </display:column>
		    <display:setProperty name="paging.banner.item_name" value="student"/>
		    <display:setProperty name="paging.banner.items_name" value="students"/>
		</display:table>
		<input type="submit" value="submit"/>
	</form>
</c:if>

<script type="text/javascript">
    highlightTableRows("personList");
</script>